package com.lagou.edu.service.impl;

import com.lagou.edu.anno.CustomService;
import com.lagou.edu.pojo.User;
import com.lagou.edu.service.UserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@CustomService
public class UserServiceImpl implements UserService {

    @Override
    public User query(HttpServletRequest request, HttpServletResponse response, String name, Integer age){
        User user = new User();
        user.setName(name);
        user.setAge(age);
        return user;
    }

    @Override
    public User query(User user) {
        User newUser = new User();
        newUser.setName(user.getName() + "01");
        newUser.setAge(user.getAge() + 20);
        return newUser;
    }
}
